package com.ncr.travel.airline.shared.configuration.converters;

/**
 * Converts to and from ISO3166 alpha-3 country codes.
 * @author Jon Cordero
 * @author Rob Cooke
 *
 */
public class CountryCodeConverterImpl implements CountryCodeConverter {
	private CountryAirportCode code = null;

	public CountryCodeConverterImpl(CountryAirportCode code) {
		this.code = code;
	}

	/**
	 * @param alpha3Code
	 * @return
	 */
	@Override
	public String convertIsoAlpha3ToAlpha2(String alpha3Code) {
		return code.convertIsoAlpha3ToAlpha2(alpha3Code);
	}

	@Override
	public String convertIsoAlpha2ToAlpha3(String alpha2Code) {
		return code.convertIsoAlpha2ToAlpha3(alpha2Code);
	}
}
